﻿<?php require_once('../../Connections/shopcarda1.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {

$file_name = $_FILES['pic']['name'];
//分割檔名
$fn_array=explode(".",$file_name);
//檔名
$mainName = $fn_array[0];
//副檔名	
$subName = $fn_array[1];

$files_upload=$_FILES['pic']['tmp_name'];
$files_name= (int)(date("YmdHi"))+rand(0,99999);

// 複製上傳圖片到指定 images 目錄
copy($_FILES['pic']['tmp_name'], "images/" .$files_name ."." .$subName); 
$pic_name = $files_name ."." .$subName;
if($_FILES['pic']['name']==""){
$pic_name = "";
}

$insertSQL = sprintf("INSERT INTO product (prod_no, p_name, add_date, sort, sb_id, price, sell_price, sell_mode, pre_year, pre_month, pre_day, ship_month, ship_day, title, pic, prod_txt) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['prod_no'], "text"),
                       GetSQLValueString($_POST['p_name'], "text"),
                       GetSQLValueString(date("Y-m-d"), "date"),
                       GetSQLValueString($_POST['sort'], "int"),
                       GetSQLValueString($_POST['sb_id'], "int"),
                       GetSQLValueString($_POST['price'], "int"),
                       GetSQLValueString($_POST['sell_price'], "int"),
                       GetSQLValueString($_POST['sell_mode'], "int"),
                       GetSQLValueString($_POST['pre_year'], "text"),
                       GetSQLValueString($_POST['pre_month'], "text"),
                       GetSQLValueString($_POST['pre_day'], "text"),
                       GetSQLValueString($_POST['ship_month'], "text"),
                       GetSQLValueString($_POST['ship_day'], "text"),
                       GetSQLValueString($_POST['title'], "text"),
                       GetSQLValueString($pic_name, "text"),
                       GetSQLValueString($_POST['prod_txt'], "text"));

  mysql_select_db($database_shopcarda1, $shopcarda1);
  $Result1 = mysql_query($insertSQL, $shopcarda1) or die(mysql_error());

  $insertGoTo = "admin_product_change_list.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  //header(sprintf("Location: %s", $insertGoTo));
  @header("Location:$insertGoTo");
}

mysql_select_db($database_shopcarda1, $shopcarda1);
$query_prod_type_r = "SELECT * FROM prod_type ORDER BY pt_id ASC";
$prod_type_r = mysql_query($query_prod_type_r, $shopcarda1) or die(mysql_error());
$row_prod_type_r = mysql_fetch_assoc($prod_type_r);
$totalRows_prod_type_r = mysql_num_rows($prod_type_r);

mysql_select_db($database_shopcarda1, $shopcarda1);
$query_company_member_r = "SELECT cm_id, company FROM company_member ORDER BY cm_id ASC";
$company_member_r = mysql_query($query_company_member_r, $shopcarda1) or die(mysql_error());
$row_company_member_r = mysql_fetch_assoc($company_member_r);
$totalRows_company_member_r = mysql_num_rows($company_member_r);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/admin_page.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>無標題文件</title>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
#cantainer {
	width: 955px;
	margin-right: 33px;
	margin-left: 33px;
}
#header {
	width: 955px;
	margin-bottom: 10px;
	background-image: url(../../images/top_bg.png);
	height: 82px;
}
#body {
	width: 955px;
	margin-bottom: 10px;
}
#footer {
	width: 955px;
}
.style2 {
	color: #666666;
	font-size: 12px;
}
#contant_list {
	float: left;
	width: 180px;
	margin-right: 10px;
}
.style17 {
	color: #74B9E5;
	font-size: 14px;
}
.style43 {
	font-size: 12px;
	color: #666666;
	font-weight: bold;
}
#contant_body {
	float: right;
	width: 765px;
}
-->
</style>
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
#contant_body_header {
	width: 765px;
	margin-bottom: 10px;
	background-image: url(../images/admin_newproduct_header.png);
	height: 62px;
}
#contant_body_contant {
	width: 765px;
	margin-bottom: 10px;
}
#contant_body_1 {
	background-image: url(../images/admin_product_add.png);
	width: 737px;
	margin-right: 10px;
	margin-left: 10px;
	height: 25px;
	margin-bottom: 10px;
}
#contant_body_2 {
	width: 737px;
	margin-right: 10px;
	margin-bottom: 10px;
	margin-left: 10px;
}
#contant_body_3 {
	height: 25px;
	width: 737px;
	margin-right: 10px;
	margin-bottom: 10px;
	margin-left: 10px;
	background-image: url(../images/admin_product_infor.png);
}
#contant_body_4 {
	width: 737px;
	margin-right: 10px;
	margin-bottom: 10px;
	margin-left: 10px;
}
.style44 {color: #000000}
#contant_body_5 {
	width: 737px;
	margin-right: 10px;
	margin-left: 10px;
	margin-bottom: 10px;
}
.style50 {	font-size: 9px;
	color: #FF0000;
}
-->
</style>
<script type="text/javascript" src="../js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="../js/selectboxes.js"></script>
<script type="text/javascript" src="../js/prod.js"></script>
<script type="text/javascript" src="../js/prod2.js"></script>
<!-- InstanceEndEditable -->
</head>

<body>
<table width="1024" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><div id="cantainer">
        <div id="header"></div>
        <div id="body">
          <div id="contant_list">
            <table border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td align="center"><img src="../../images/index_12.png" width="180" height="54" /></td>
              </tr>
              <tr>
                <td><table width="180" border="0" align="center" cellpadding="0" cellspacing="0" background="../../images/index_12_20.png">
                    <tr>
                      <td width="10"></td>
                      <td><table border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr>
                            <td align="center"><span class="style17">＞</span></td>
                            <td align="left" class="style43">商品管理</td>
                          </tr>
                          <tr>
                            <td width="30" align="center">&nbsp;</td>
                            <td width="127" align="left" class="style2"><a href="admin_product_add.php">新增商品</a><br />
                              <a href="admin_product_change_list.php">產品資訊管理</a><br />
                              供應商上架商品確認<br /></td>
                          </tr>
                          <tr>
                            <td colspan="2"><img src="../../images/dotsline.png" width="167" height="11" /></td>
                          </tr>
                          <tr>
                            <td align="center"><span class="style17">＞</span></td>
                            <td align="left"><strong class="style43">會員管理</strong></td>
                          </tr>
                          <tr>
                            <td align="center">&nbsp;</td>
                            <td align="left" class="style2"><a href="../member/company_member/admin_companym_add.php">新增公司會員</a><br />
                              <a href="../member/company_member/admin_companym_list.php">公司會員管理</a><br />
                              <a href="../member/personal_member/admin_pearsonal_list.php">個人會員管理</a></td>
                          </tr>
                          <tr>
                            <td colspan="2"><img src="../../images/dotsline.png" alt="" width="167" height="11" /></td>
                          </tr>
                          <tr>
                            <td align="center"><span class="style17">＞</span></td>
                            <td align="left" class="style43">供應商管理</td>
                          </tr>
                          <tr>
                            <td align="center">&nbsp;</td>
                            <td align="left" class="style2"><a href="../supplier/admin_supplier_brand.php">品牌管理</a></td>
                          </tr>
                          <tr>
                            <td colspan="2"><img src="../../images/dotsline.png" alt="" width="167" height="11" /></td>
                          </tr>
                          <tr>
                            <td align="center"><span class="style17">＞</span></td>
                            <td align="left" class="style43">進銷存管理</td>
                          </tr>
                          <tr>
                            <td align="center">&nbsp;</td>
                            <td align="left" class="style2"><p><a href="../inventory/admin_inventory_search.php">架上庫存管理</a><br />
                                <a href="../inventory/admin_inventory_in_search.php">進貨管理</a><br />
                                <a href="../inventory/admin_inventory_inper_search.php">預購商品進貨管理</a><br />
                                <a href="../inventory/admin_inventory_return_search.php">退貨管理</a><br />
                                <a href="../inventory/admin_inventory_inhistory_search.php">進退貨記錄</a><br />
                                <a href="../supplier/admin_suppliera_change_list.php">供應商出貨地址調整</a></p></td>
                          </tr>
                          <tr>
                            <td colspan="2" align="center"><img src="../../images/dotsline.png" alt="" width="167" height="11" /></td>
                          </tr>
                          <tr>
                            <td align="center"><span class="style17">＞</span></td>
                            <td align="left" class="style43">訂單管理</td>
                          </tr>
                          <tr>
                            <td align="center">&nbsp;</td>
                            <td align="left" class="style2"><a href="../order/admin_order_search.php">訂單管理</a><br />
                              <a href="../order/admin_orderper_search.php">預購訂單管理</a><br />
                              <a href="../order/admin_order_return_search.php">訂單退換貨管理</a><br />
                              <a href="../order/admin_order_history_search.php">訂單記錄</a></td>
                          </tr>
                          <tr>
                            <td colspan="2" align="center"><img src="../../images/dotsline.png" alt="" width="167" height="11" /></td>
                          </tr>
                          <tr>
                            <td align="center"><span class="style17">＞</span></td>
                            <td align="left" class="style43">紅利管理</td>
                          </tr>
                          <tr>
                            <td align="center">&nbsp;</td>
                            <td align="left" class="style2"><a href="../bonus/admin_bonus_manage.php">紅利設定</a><br />
                              <a href="../bonus/admin_bonus_manage_company.php">公司會員紅利管理</a><br />
                              <a href="../bonus/admin_bonus_manage_personal.php">個人會員紅利管理</a></td>
                          </tr>
                          <tr>
                            <td colspan="2" align="center"><img src="../../images/dotsline.png" alt="" width="167" height="11" /></td>
                          </tr>
                          <tr>
                            <td align="center"><span class="style17">＞</span></td>
                            <td align="left" class="style43">資訊管理</td>
                          </tr>
                          <tr>
                            <td align="center">&nbsp;</td>
                            <td align="left" class="style2">商品評價管理<br />
                              公告資訊管理<br />
                              公司資訊管理<br />
                              客服資訊管理<br />
                              Banner管理</td>
                          </tr>
                          <tr>
                            <td colspan="2"><img src="../../images/dotsline.png" alt="" width="167" height="11" /></td>
                          </tr>
                          <tr>
                            <td align="center"><span class="style17">＞</span></td>
                            <td class="style43">權限管理</td>
                          </tr>
                          <tr>
                            <td>&nbsp;</td>
                            <td class="style2"><a href="../user/admin_user_add.php">新增使用者</a><br />
                              <a href="../user/admin_user_change_list.php">使用者設定</a><br />
                              <a href="../user/admin_user_group_list.php">群組設定</a><br />
                              使用者權限設定</td>
                          </tr>
                          <tr>
                            <td colspan="2"><img src="../../images/dotsline.png" alt="" width="167" height="11" /></td>
                          </tr>
                        </table></td>
                      <td width="10"></td>
                    </tr>
                  </table></td>
              </tr>
              <tr>
                <td width="180" height="28" align="center"><table width="0" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="180" height="28" align="center"><img src="../../images/index_20.png" width="180" height="28" /></td>
                    </tr>
                  </table></td>
              </tr>
            </table>
          </div>
          <!-- InstanceBeginEditable name="EditRegion1" -->
        <form action="<?php echo $editFormAction; ?>" method="POST" name="form1" id="form1" enctype="multipart/form-data">
        <div id="contant_body">
          <div id="contant_body_header"></div>
          <div id="contant_body_contant">
            <table cellpadding="0" cellspacing="0">
              <tr>
                <td colspan="3"><img src="../../member/img/member_body_up.jpg" width="765" height="9" /></td>
              </tr>
              <tr>
                <td width="4" background="../../member/img/member_body_left.jpg">&nbsp;</td>
                <td width="757"><div id="contant_body_1"></div>
                  <div id="contant_body_2">
                    <table width="737" cellpadding="5" cellspacing="0">
                      <tr>
                        <td align="left" class="style2 style44">商品貨號                          </td>
                        <td colspan="3" class="style2">&nbsp;</td>
                      </tr>
                      <tr>
                        <td align="left" bgcolor="#E2F8F6" class="style2 style44">商品原始貨號</td>
                        <td colspan="3" bgcolor="#E2F8F6" class="style2">
                          <label>
                            <input type="text" name="prod_no" id="prod_no" />
                            </label>                      </td>
                      </tr>
                      <tr>
                        <td width="120" align="left" class="style2 style44">商品名稱</td>
                        <td colspan="3" class="style2">
                          <label>
                          <input name="p_name" type="text" id="p_name" size="30" />
                          </label>                     </td>
                      </tr>
                      
                      <tr>
                        <td align="left" bgcolor="#E2F8F6" class="style2 style44">商品類別</td>
                        <td width="116" bgcolor="#E2F8F6" class="style2">
                          <label>
                            <select name="select1" id="select1">
                              <?php
do {  
?>
                              <option value="<?php echo $row_prod_type_r['pt_id']?>"><?php echo $row_prod_type_r['type']?></option>
                              <?php
} while ($row_prod_type_r = mysql_fetch_assoc($prod_type_r));
  $rows = mysql_num_rows($prod_type_r);
  if($rows > 0) {
      mysql_data_seek($prod_type_r, 0);
	  $row_prod_type_r = mysql_fetch_assoc($prod_type_r);
  }
?>
                            </select>
                            </label>                      </td>
                        <td width="118" bgcolor="#E2F8F6" class="style2">
                          <label>
                            <select name="sort" id="sort">
</select>
                            </label> 
                            </td>
                        <td width="341" bgcolor="#E2F8F6" class="style2 style44">&nbsp;</td>
                      </tr>
                      <tr>
                        <td align="left" class="style2 style44">製造商</td>
                        <td colspan="3" class="style2 style44">
                          <label>
                            <select name="select2" id="select2">
                              <?php
do {  
?>
                              <option value="<?php echo $row_company_member_r['cm_id']?>"><?php echo $row_company_member_r['company']?></option>
                              <?php
} while ($row_company_member_r = mysql_fetch_assoc($company_member_r));
  $rows = mysql_num_rows($company_member_r);
  if($rows > 0) {
      mysql_data_seek($company_member_r, 0);
	  $row_company_member_r = mysql_fetch_assoc($company_member_r);
  }
?>
                            </select>
                            </label>
                          <label>
                          <select name="sb_id" id="sb_id">
</select>
                          </label>                       <label></label></td>
                      </tr>
                      <tr>
                        <td align="left" bgcolor="#E2F8F6" class="style2 style44">訂價</td>
                        <td colspan="3" bgcolor="#E2F8F6" class="style2">
                          <label>
                            <input name="price" type="text" id="price" size="15" />
                            </label>                     </td>
                      </tr>
                      <tr>
                        <td align="left" class="style2 style44">售價</td>
                        <td colspan="3" class="style2">
                            <label>
                              <input name="sell_price" type="text" id="sell_price" size="15" />
                              </label>                      </td>
                      </tr>
                      <tr>
                        <td align="left" bgcolor="#E2F8F6" class="style2 style44">販售方式</td>
                        <td colspan="3" bgcolor="#E2F8F6" class="style2">
                          <label>                            </label>
                          <p>
                            <label>
                              <input name="sell_mode" type="radio" id="sell_mode_0" value="1" checked="checked" />
                              正品</label>
                            <label>
                              <input type="radio" name="sell_mode" value="2" id="sell_mode_1" />
                              特價</label>
                            <label>
                              <input type="radio" name="sell_mode" value="3" id="sell_mode_2" />
                              預售</label>
                            &nbsp;
                            <label>
                              <input name="pre_year" type="text" id="pre_year" size="4" />
                              年
                              <select name="pre_month" id="pre_month">
                                <option selected="selected">請選擇</option>
                                <option value="1">1</option>
                                <option value="2">2</option>
                                <option value="3">3</option>
                                <option value="4">4</option>
                                <option value="5">5</option>
                                <option value="6">6</option>
                                <option value="7">7</option>
                                <option value="8">8</option>
                                <option value="9">9</option>
                                <option value="10">10</option>
                                <option value="11">11</option>
                                <option value="12">12</option>
                                </select>
                              月
                              <select name="pre_day" id="pre_day">
                                <option selected="selected">請選擇</option>
                                <option value="1">1</option>
                                <option value="2">2</option>
                                <option value="3">3</option>
                                <option value="4">4</option>
                                <option value="5">5</option>
                                <option value="6">6</option>
                                <option value="7">7</option>
                                <option value="8">8</option>
                                <option value="9">9</option>
                                <option value="10">10</option>
                                <option value="11">11</option>
                                <option value="12">12</option>
                                <option value="13">13</option>
                                <option value="14">14</option>
                                <option value="15">15</option>
                                <option value="16">16</option>
                                <option value="17">17</option>
                                <option value="18">18</option>
                                <option value="19">19</option>
                                <option value="20">20</option>
                                <option value="21">21</option>
                                <option value="22">22</option>
                                <option value="23">23</option>
                                <option value="24">24</option>
                                <option value="25">25</option>
                                <option value="26">26</option>
                                <option value="27">27</option>
                                <option value="28">28</option>
                                <option value="29">29</option>
                                <option value="30">30</option>
                                <option value="31">31</option>
                                </select>
                              日</label>
                          </td>
                      </tr>
                      <tr>
                        <td align="left" bgcolor="#E2F8F6" class="style2 style44">出貨時間</td>
                        <td colspan="3" bgcolor="#E2F8F6" class="style2">
                          <label>
                            <select name="ship_month" id="ship_month">
                              <option selected="selected">請選擇</option>
                              <option value="1">1個</option>
                              <option value="2">2個</option>
                              <option value="3">3個</option>
                              <option value="4">4個</option>
                              <option value="5">5個</option>
                              <option value="6">6個</option>
                              <option value="7">7個</option>
                              <option value="8">8個</option>
                              <option value="9">9個</option>
                              <option value="10">10個</option>
                              <option value="11">11個</option>
                              <option value="12">12個</option>
                            </select>
                            </label>
                          月
                          <label>
                            <select name="ship_day" id="ship_day">
                              <option selected="selected">請選擇</option>
                              <option value="1">1</option>
                                <option value="2">2</option>
                                <option value="3">3</option>
                                <option value="4">4</option>
                                <option value="5">5</option>
                                <option value="6">6</option>
                                <option value="7">7</option>
                                <option value="8">8</option>
                                <option value="9">9</option>
                                <option value="10">10</option>
                                <option value="11">11</option>
                                <option value="12">12</option>
                                <option value="13">13</option>
                                <option value="14">14</option>
                                <option value="15">15</option>
                                <option value="16">16</option>
                                <option value="17">17</option>
                                <option value="18">18</option>
                                <option value="19">19</option>
                                <option value="20">20</option>
                                <option value="21">21</option>
                                <option value="22">22</option>
                                <option value="23">23</option>
                                <option value="24">24</option>
                                <option value="25">25</option>
                                <option value="26">26</option>
                                <option value="27">27</option>
                                <option value="28">28</option>
                                <option value="29">29</option>
                                <option value="30">30</option>
                                <option value="31">31</option>
                            </select>
                            </label>
                          日                      </td>
                      </tr>
                    </table>
                  </div>
                  <div id="contant_body_3"></div>
                  <div id="contant_body_4">
                    <table width="737" cellspacing="0" cellpadding="5">
                      <tr>
                        <td width="120" align="left" valign="top" class="style2 style44">標題</td>
                        <td width="595" class="style2">
                            <label>
                            <textarea name="title" id="title" cols="45" rows="2"></textarea>
                            </label>
                        </td>
                      </tr>
                      <tr bgcolor="#E2F8F6">
                        <td align="left" valign="top" class="style2 style44">小圖上傳</td>
                        <td class="style2"><table width="100%" cellspacing="0" cellpadding="5">
                            <tr>
                              <td width="41%" class="style44">
                                  <label>
                                  <input name="pic" type="file" id="pic" size="30" />
                                  </label>
                              </td>
                              <td width="48%" class="style44">1:1</td>
                            </tr>
                        </table></td>
                      </tr>
                      <tr>
                        <td align="left" valign="top" class="style2 style44">介紹內容</td>
                        <td class="style2">
                            <label>
                            <textarea name="prod_txt" id="prod_txt" cols="65" rows="20"></textarea>
                            </label>
                        </td>
                      </tr>
                    </table>
                  </div>
                  <div id="contant_body_5">
                    <table width="100%" cellspacing="0" cellpadding="0">
                      <tr>
                        <td align="center">
                          <label>
                            <input type="submit" name="button7" id="button7" value="新增" />
                            </label>
                          <label>
                          <input type="reset" name="button8" id="button8" value="重填" />
                          </label>
                        </td>
                      </tr>
                    </table>
                  </div></td>
                <td width="4" background="../../member/img/member_body_right.jpg">&nbsp;</td>
              </tr>
              <tr>
                <td height="9" colspan="3"><img src="../../member/img/member_body_down.jpg" width="765" height="9" /></td>
              </tr>
            </table>
          </div>
        </div>
        <input type="hidden" name="MM_insert" value="form1" />
        </form>
        <?php
include_once "ckeditor/ckeditor.php";
$CKEditor = new CKEditor();
$CKEditor->basePath = 'ckeditor/';
$CKEditor->replace("prod_txt");
?>
        <!-- InstanceEndEditable --></div>
        <div id="footer">
          <table width="955" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="230" height="118" align="center"><a href="index.html"><img width="200" height="66" alt="logo位置" style="background-color: #FF0000" /></a></td>
              <td width="10" align="center"><img src="../../images/end_Separateline1.png" width="1" height="80" /></td>
              <td width="715" valign="middle"><table width="715" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td height="40" valign="top" class="style2"><table border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td width="50" align="center" class="style2"></td>
                          <td>本平台中台灣各店家所銷售的商品或服務，都是由各該店家所銷售或提供。 | 電話 : 02-2275-3588 | 傳真 : 02-2275-3788<br/>
                            微衡科技　版權所有 ⓒ 2011 Microbalance. All Rights Reserved.</td>
                        </tr>
                      </table></td>
                  </tr>
                </table></td>
            </tr>
          </table>
        </div>
      </div></td>
  </tr>
</table>
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($prod_type_r);

mysql_free_result($company_member_r);
?>
